﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Common.Views;

namespace ElectroSystem.Models
{
    public class ManageReturnsModel
    {
        public List<OrdersView> Products { get; set; }

        [Required(ErrorMessage = "Enter the fault details for the product.")]
        public string FaultDetails { get; set; }

        [Required(ErrorMessage = "Choose a fault category for the product.")]
        public int FaultCategory { get; set; }

        public string RandomNumber { get; set; }

        public int ProductID { get; set; }

        public string ProductName { get; set; }

        public Guid OrderID { get; set; }

        public string FaultStatus { get; set; }

        public ManageReturnsModel() { }

        public ManageReturnsModel(string username)
        {
            Products = new OrdersServ.OrdersServiceClient().GetProductsBoughtByUser(username);
        }
    }
}